#pragma once
#include "render/Texture.h"

typedef unsigned int GLenum;

namespace Cogs {
	class OpenGLTexture2D : public Texture2D {
	public:
		OpenGLTexture2D(const std::string& path);
		OpenGLTexture2D(const uint32_t width, uint32_t height);
		virtual ~OpenGLTexture2D();

		uint32_t GetHeight() const override;
		uint32_t GetWidth() const override;
		uint32_t GetRendererID() const override;

		void SetData(void* data, uint32_t size) override;
		void Bind(uint32_t solt = 0) const override;

		bool IsLoaded() const override;
		bool operator == (const Texture2D& other) const override;
	private:
		std::string m_Path;
		uint32_t m_Width, m_Height;
		uint32_t m_RendererID;
		bool m_IsLoad = false;
		GLenum m_DataFromat, m_InternalFromat;
	};
}